Various embodiments of this disclosure relate to computers, and more specifically, to resource pre-configuration.
One or more transactions may be executed on a system such as a database management system (DBMS), a server management system, a transaction management system, a file system, or a storage management system. These transactions usually have to access some resources of the system during running, including files, memory blocks, datasets, and the like. During execution of the transactions, these resources may be configured into a particular state. For example, a file may be kept in an open state while a storage block records relevant storage information of the file and provides services for read/write operations on the file; and frequently accessed data may be relocated from a magnetic disk into a memory or cache, and the like. In another example, when transactions share resources when using data in a file, database table, or memory space, the transactions may add a lock to the shared resources so as to prevent contents of the resources from being altered by other transactions during their access, thereby ensuring data consistency.
After system start-up, when a first batch of transactions are loaded on the system to run, the required resources have not been configured properly yet. Therefore, the first batch of transactions have to configure the resources from the start, e.g., opening a file, reading data on a magnetic disc, setting access rights for a memory, and the like. Therefore, compared with subsequent loaded transactions, execution efficiency of the first batch of transactions is lower. Similarly, when the system shuts down due to maintenance, upgrade, fault or power interruption, the resource state as previously configured by the transactions will be lost or reset. Therefore, when the system restarts, execution efficiency of the first batch of transactions re-loaded on the system to run will also be affected, because they have to perform the resource configuration operation again. In addition, when a new transaction is developed and deployed on the system, it is very likely that the resources that will be used by the transaction have not been configured and used by other transactions. Therefore, the new transaction has to perform initial settings of the resources, thereby degrading its execution efficiency.
Using a mainframe platform as an example, it has been found that for a first batch of transactions loaded after the system is started or re-started, or for a newly deployed transaction, its execution speed can be a couple of or even dozens of times slower than transactions in later batches.